-- GENERATED SPELL FOR [Shield of Velen] --


function spell0_20674(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_20674', 615, 1)
end

function spell1_20674(pUnit, Event) --@Revenge,n/a--
pUnit:FullCastSpellOnTarget(12170,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20674', 565, 1)
end

function spell2_20674(pUnit, Event) --@Shield Block,Self--
pUnit:FullCastSpellOnTarget(12169,pUnit)
pUnit:RegisterEvent('Sorts_20674', 5288, 1)
end

function Sorts_20674(pUnit, Event)
local choix_sorts_20674 = math.random(0, 2)
if choix_sorts_20674 == 0 then
pUnit:RegisterEvent('spell0_20674', 1, 1)
end
if choix_sorts_20674 == 1 then
pUnit:RegisterEvent('spell1_20674', 1, 1)
end
if choix_sorts_20674 == 2 then
pUnit:RegisterEvent('spell2_20674', 1, 1)
end
end

function mob20674_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20674', math.random(1500, 3000), 1)
end

function mob20674_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20674_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20674_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20674, 1, 'mob20674_Action')
RegisterUnitEvent(20674, 2, 'mob20674_Leave')
RegisterUnitEvent(20674, 3, 'mob20674_Kill')
RegisterUnitEvent(20674, 4, 'mob20674_Die')
